/*
 * @Author: 一路向阳 tt_sunzhenfeng@163.com
 * @Date: 2024-03-16 16:29:20
 * @LastEditors: 一路向阳 tt_sunzhenfeng@163.com
 * @LastEditTime: 2024-03-17 18:49:03
 * @FilePath: \react-demo\src\App.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useSelector, useDispatch } from 'react-redux';
import './App.scss';

const App = () => {
  const { count } = useSelector(state => state.counter);

  const dispatch = useDispatch();
  return (
    <div className="app">
      <button>-</button>
      <span>{ count }</span>
      <button onClick={() => dispatch({ type: 'increment' })}>+</button>
    </div>
  );
};

export default App;